<?php
$con = mysqli_connect("db15.freehost.com.ua","zvit_root","openac1948","zvit_other");
mysqli_set_charset($con, "utf8");
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con,"SELECT Id, Nick, Password FROM User");
$output = array();
while($row = mysqli_fetch_array($result)) {
	$output[] = array($row['Id'],stripslashes($row['Nick']),stripslashes($row['Password']));
}
echo json_encode($output);
mysqli_close($con);
?>
